<template>
  <Col :span="span">
    <ButtonGroup shape="circle">
      <Button type="primary" @click="handler"> <Icon type="md-search" :size="20" /> 查询 </Button>
      <Button type="default" @click="resetHandler"> <Icon type="md-refresh" :size="20" /> 重置 </Button>
    </ButtonGroup>
  </Col>
</template>

<script>
export default {
  props: {
    so: {
      type: Object
    },
    span: {
      type: String,
      default: '4'
    }
  },
  data() {
    return {
      tempSO: null
    };
  },
  methods: {
    handler() {
      this.$bus.emit('bus-search-click', this.so);
      // this.$emit('bus-search-click', this.so);
    },
    resetHandler() {
      this.utils.fillData(this.so, this.tempSO);

      this.$bus.emit('bus-search-reset', this.so);
    }
  },
  mounted() {
    this.tempSO = JSON.parse(JSON.stringify(this.so));
  }
};
</script>
